#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int arr[505][505];
int ans, N;
int main()
{
	cin >> N;
	for (int i = 1; i <= N; i++)
		for (int j = i + 1; j <= N; j++) {
			scanf("%d", &arr[j][i]);
			arr[i][j] = arr[j][i];
		}
	for (int i = 1; i <= N; i++) {
		sort(arr[i] + 1, arr[i] + 1 + N);
		ans = max(arr[i][N - 1], ans);
	}
	cout << 1 << endl << ans;
	return 0;
}